<template>
  <image-select :url.sync="tempValue" />
</template>

<script>
import ImageSelect from './components/image-select'
export default {
  name: 'AttrH5ImageSrc',
  components: {
    ImageSelect
  },
  props: {
    imageSrc: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      tempValue: ''
    }
  },
  watch: {
    imageSrc(val) {
      this.tempValue = val
    },
    tempValue() {
      this.$emit('update:imageSrc', this.tempValue)
    }
  },
  mounted() {
    this.tempValue = this.imageSrc
  }
}
</script>
